Lightweight Directory Access Protocol (LDAP) is a networking protocol for TCP/IP network directory services. An LDAP directory typically is represented as a hierarchical tree of entries, each of which consists of a set of named attributes with values. Each entry has a unique identifier known as a Distinguished Name (DN), which consists of a set of attributes and the DN of its parent entry, if any. The set of attributes is referred to as the entry's Relative Distinguished Name (RDN). Each attribute consists of a “name:value” pair and some attributes may be multivalued. Thus, the entry for Jane Smith who works for John Doe in the Sample company may be represented as a string:
dn: cn=Jane Smith, dc=sample, dc=com
manager: cn=John Doe, dc=sample, dc=com
mail: jane.smith@sample.com
where dn is the name of the entry, “cn=Jane Smth” is the entry's RDN and “dc=sample, dc=com” is the DN of the parent entry. The other lines show the attributes in the entry. Attribute names are typically mnemonic strings, like “cn” for common name, “dc” for domain component, and “mail” for e-mail address. The attributes for a DN are defined as objects in an LDAP schema. A Directory Information Tree (DIT) defines the logical structure of the hierarchy
Each LDAP server in a network commonly stores a directory subtree rooted at a specific entry, e.g. “dc=sample, dc=com” and will return results of queries on that subtree to the requesting client. An LDAP server may also hold references to other LDAP servers, so that a query on the “ou=Engineering, dc=sample, dc=com” would cause the server to return to the client a reference to another LDAP server that stores that part of the directory tree. Alternatively, an LDAP server may be configured to pass the query onto the appropriate server and then return the result to the client.